﻿using System;
using System.Security.Cryptography;
using System.Text;

namespace Rezepto.Tools
{
    public static class CryptoTools
    {
        public static string Encrypt(string plainText)
        {
            MD5 md5 = new MD5CryptoServiceProvider();
            byte[] textToHash = Encoding.Default.GetBytes(plainText);
            byte[] result = md5.ComputeHash(textToHash);

            return BitConverter.ToString(result); 
        }
    }
}